package main
import (
    "net/http"
    "fmt"
    "strings"
    "log"
)

func sayHello(w http.ResponseWriter,r *http.Request){
    r.ParseForm()
    fmt.Println("form:",r.Form)
    fmt.Println("path:",r.URL.Path)
    fmt.Println("scheme:",r.URL.Scheme)
    fmt.Println("url long:",r.Form["url_long"])
    for k,v := range r.Form{
        fmt.Println("key:",k)
        fmt.Println("val:",strings.Join(v,""))
    }
    fmt.Fprint(w,"hello world")
}
func main() {
    http.HandleFunc("/",sayHello)
    err := http.ListenAndServe(":9090",nil)
    if err != nil{
        log.Fatal(" Listen And Server :",err)
    }
    fmt.Println(" Server started")
}

